Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow configuration of PVC size from ConfigMap #866

Merged
merged 1 commit into from
May 25, 2019

Conversation

carlossg
Copy link
Contributor

Changes

Add a ConfigMap for PVC configuration, particularly the size of the PVC

Submitter Checklist

These are the criteria that every PR should meet, please check them off as you
review them:

PVCs are hardcoded to 5Gi and that should be configurable.
For instance Alibaba Container Service does not allow volumes smaller than 20Gi

Add a config-artifact-pvc ConfigMap that can be used to store such configuration

Release Notes

Add a `config-artifact-pvc` ConfigMap that can be used to store the created PVC size

@googlebot googlebot added the cla: yes Trying to make the CLA bot happy with ppl from different companies work on one commit label May 15, 2019
@tekton-robot tekton-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels May 15, 2019
@carlossg
Copy link
Contributor Author

This is a rough PR from my lack of Golang skills :(

@abayer
Copy link
Contributor

abayer commented May 15, 2019

/ok-to-test

@tekton-robot tekton-robot removed the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label May 15, 2019
@carlossg
Copy link
Contributor Author

carlossg commented May 16, 2019

Integration test failing with
Google Compute Engine does not have enough resources available to fulfill request: us-central1-a.

😭

@vdemeester
Copy link
Member

/test pull-tekton-pipeline-integration-tests

carlossg added a commit to carlossg/tekton that referenced this pull request May 16, 2019
Copy link
Member

@afrittoli afrittoli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work, thank you for this!
The only comment I have is about test coverage, but I think this could go ahead like this and we could improve test coverage later.

configMap *corev1.ConfigMap
expectedArtifactStorage ArtifactStorageInterface
}{{
desc: "valid bucket",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NIT: valid PVC

pkg/artifacts/artifact_storage_test.go Show resolved Hide resolved
@abayer
Copy link
Contributor

abayer commented May 16, 2019

/assign @abayer

@carlossg
Copy link
Contributor Author

I have made ArtifactPVC include the pvc for testing. I don't know if it is great as the PVC is only created during initialization, not in GetArtifactStorage, and so GetArtifactStorage returns an ArtifactPVC with nil PVC
I wasn't able to test expectations, ie. check that the mock k8sclient is called with POST PersistentVolumeClaim and get the parameter.

@abayer
Copy link
Contributor

abayer commented May 20, 2019

/lgtm

@tekton-robot tekton-robot added the lgtm Indicates that a PR is ready to be merged. label May 20, 2019
@carlossg
Copy link
Contributor Author

/retest

@tekton-robot tekton-robot removed the lgtm Indicates that a PR is ready to be merged. label May 20, 2019
PVCs are hardcoded to 5Gi and that should be configurable.
For instance Alibaba Container Service does not allow volumes smaller than 20Gi

Add a `config-artifact-pvc` ConfigMap that can be used to store such configuration

Signed-off-by: Carlos Sanchez <[email protected]>
@abayer
Copy link
Contributor

abayer commented May 20, 2019

/ok-to-test

@abayer
Copy link
Contributor

abayer commented May 20, 2019

/lgtm

@tekton-robot tekton-robot added the lgtm Indicates that a PR is ready to be merged. label May 20, 2019
@carlossg
Copy link
Contributor Author

/test pull-tekton-pipeline-integration-tests

@dlorenc
Copy link
Contributor

dlorenc commented May 25, 2019

/approve

@tekton-robot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: carlossg, dlorenc

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@tekton-robot tekton-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label May 25, 2019
@tekton-robot tekton-robot merged commit 0009974 into tektoncd:master May 25, 2019
@bobcatfish
Copy link
Collaborator

I think this could go ahead like this and we could improve test coverage later.

only if we definitely plan to improve it in a follow-up PR! otherwise id definitely rather err on the side of having it all in one PR (tests + docs + code)

@carlossg
Copy link
Contributor Author

I've added some tests before it was merged

@bobcatfish
Copy link
Collaborator

I've added some tests before it was merged

phew, close one :D ❤️

@carlossg carlossg deleted the pvc-size branch May 30, 2019 05:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cla: yes Trying to make the CLA bot happy with ppl from different companies work on one commit lgtm Indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants